<!doctype html>
<html lang="zh-CN">
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <meta name="referrer" content="no-referrer-when-downgrade">
    

    <title>my.cnf 配置文件详解 | matrix</title>
    <meta property="og:title" content="my.cnf 配置文件详解 - matrix">
    <meta property="og:type" content="article">
        
    <meta property="article:published_time" content='2021-01-16T14:30:24&#43;08:00'>
        
        
    <meta property="article:modified_time" content='2021-01-16T14:30:24&#43;08:00'>
        
    <meta name="Keywords" content="黑客技术，WEB安全，让你听懂每个漏洞成因，明白每个技术原理,博客,项目管理,python,软件架构,公众号,小程序">
    <meta name="description" content="my.cnf 配置文件详解">
        
    <meta name="author" content="matrix">
    <meta property="og:url" content="https://gitmatrix.gitee.io/post/Mysql-%E6%95%B0%E6%8D%AE%E5%BA%93/my.cnf-%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E8%AF%A6%E8%A7%A3/">
    <link rel="shortcut icon" href='/favicon.ico'  type="image/x-icon">

    <link rel="stylesheet" href='/css/normalize.css'>
    <link rel="stylesheet" href='/css/style.css'>
    <script type="text/javascript" src="//cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

    
    
    
        <link href="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" rel="stylesheet">
    
    
    
    
        <link rel="stylesheet" href='/css/douban.css'>
    
        <link rel="stylesheet" href='/css/other.css'>
    
</head>


<body>
    <header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="https://gitmatrix.gitee.io/">
                        matrix
                    </a>
                
                <p class="description">黑客技术，WEB安全，让你听懂每个漏洞成因，明白每个技术原理</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="current" href="https://gitmatrix.gitee.io/">首页</a>
                    
                    <a  href="https://gitmatrix.gitee.io/archives/" title="归档">归档</a>
                    
                    <a  href="https://gitmatrix.gitee.io/about/" title="关于">关于</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>

    <div id="body">
        <div class="container">
            <div class="col-group">

                <div class="col-8" id="main">
                    
<div class="res-cons">
    <style type="text/css">
    .post-toc {
        position: fixed;
        width: 200px;
        margin-left: -210px;
        padding: 5px 10px;
        font-family: Athelas, STHeiti, Microsoft Yahei, serif;
        font-size: 12px;
        border: 1px solid rgba(0, 0, 0, .07);
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.98);
        background-clip: padding-box;
        -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        box-shadow: 1px 1px 2px rgba(0, 0, 0, .125);
        word-wrap: break-word;
        white-space: nowrap;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        z-index: 999;
        cursor: pointer;
        max-height: 70%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .post-toc .post-toc-title {
        width: 100%;
        margin: 0 auto;
        font-size: 20px;
        font-weight: 400;
        text-transform: uppercase;
        text-align: center;
    }

    .post-toc .post-toc-content {
        font-size: 15px;
    }

    .post-toc .post-toc-content>nav>ul {
        margin: 10px 0;
    }

    .post-toc .post-toc-content ul {
        padding-left: 20px;
        list-style: square;
        margin: 0.5em;
        line-height: 1.8em;
    }

    .post-toc .post-toc-content ul ul {
        padding-left: 15px;
        display: none;
    }

    @media print,
    screen and (max-width:1057px) {
        .post-toc {
            display: none;
        }
    }
</style>
<div class="post-toc" style="position: absolute; top: 188px;">
    <h2 class="post-toc-title">文章目录</h2>
    <div class="post-toc-content">
        <nav id="TableOfContents">
  <ul>
    <li>
      <ul>
        <li><a href="#配置文件的读取过程">配置文件的读取过程</a></li>
      </ul>
    </li>
    <li><a href="#配置文件参数">配置文件参数</a></li>
  </ul>
</nav>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        var postToc = $(".post-toc");
        if (postToc.length) {
            var leftPos = $("#main").offset().left;
            if(leftPos<220){
                postToc.css({"width":leftPos-10,"margin-left":(0-leftPos)})
            }

            var t = postToc.offset().top - 20,
                a = {
                    start: {
                        position: "absolute",
                        top: t
                    },
                    process: {
                        position: "fixed",
                        top: 20
                    },
                };
            $(window).scroll(function () {
                var e = $(window).scrollTop();
                e < t ? postToc.css(a.start) : postToc.css(a.process)
            })
        }
    })
</script>
    <article class="post">
        <header>
            <h1 class="post-title">my.cnf 配置文件详解</h1>
        </header>
        <date class="post-meta meta-date">
            2021年1月16日
        </date>
        
        <div class="post-meta">
            <span>|</span>
            
            <span class="meta-category"><a href='/categories/Mysql'>Mysql</a></span>
            
        </div>
        
        
        <div class="post-meta">
            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span>
                    阅读</span></span>
        </div>
        
        
        <div class="clear" style="display: none">
            <div class="toc-article">
                <div class="toc-title">文章目录</div>
            </div>
        </div>
        
        <div class="post-content">
            <h1 id="mycnf-配置文件详解">my.cnf 配置文件详解、</h1>
<h3 id="配置文件的读取过程">配置文件的读取过程</h3>
<div class="highlight"><div style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4">
<table style="border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;"><tr><td style="vertical-align:top;padding:0;margin:0;border:0;">
<pre style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3
</span></code></pre></td>
<td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
<pre style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#998;font-style:italic"># mysqld --help --verbose | grep my.cnf</span>

/etc/my.cnf --&gt; /etc/mysql/my.cnf --&gt; <span style="color:#008080">$MYSQL_HOME</span>/my.cnf --&gt; defaults-extra-file<span style="color:#000;font-weight:bold">=</span>/tmp/clsn.txt --&gt; ~/.my.cnf
</code></pre></td></tr></table>
</div>
</div><blockquote>
<p>注：假设4个配置文件都存在，同时使用&ndash;defaults-extra-file指定了参数文件，如果这时有一个 &ldquo;参数变量&quot;在5个配置文件中都出现了，那么后面的配置文件中的参数变量值会覆盖前面配置文件中的参数变量值，就是说会使用 ~/.my.cnf 中设置的值</p>
</blockquote>
<p>　　如果使用./bin/mysqld_safe 守护进程启动mysql数据库时，使用了 &ndash;defaults-file=&lt;配置文件的绝对路径&gt;参数，这时只会使用这个参数指定的配置文件。</p>
<h2 id="配置文件参数">配置文件参数</h2>
<div class="highlight"><div style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4">
<table style="border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;"><tr><td style="vertical-align:top;padding:0;margin:0;border:0;">
<pre style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">  1
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">  2
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">  3
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">  4
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">  5
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">  6
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">  7
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">  8
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">  9
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 10
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 11
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 12
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 13
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 14
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 15
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 16
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 17
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 18
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 19
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 20
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 21
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 22
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 23
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 24
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 25
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 26
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 27
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 28
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 29
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 30
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 31
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 32
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 33
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 34
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 35
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 36
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 37
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 38
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 39
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 40
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 41
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 42
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 43
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 44
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 45
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 46
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 47
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 48
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 49
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 50
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 51
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 52
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 53
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 54
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 55
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 56
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 57
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 58
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 59
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 60
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 61
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 62
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 63
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 64
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 65
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 66
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 67
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 68
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 69
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 70
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 71
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 72
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 73
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 74
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 75
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 76
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 77
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 78
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 79
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 80
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 81
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 82
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 83
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 84
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 85
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 86
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 87
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 88
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 89
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 90
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 91
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 92
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 93
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 94
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 95
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 96
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 97
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 98
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 99
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">100
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">101
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">102
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">103
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">104
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">105
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">106
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">107
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">108
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">109
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">110
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">111
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">112
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">113
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">114
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">115
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">116
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">117
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">118
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">119
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">120
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">121
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">122
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">123
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">124
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">125
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">126
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">127
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">128
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">129
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">130
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">131
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">132
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">133
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">134
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">135
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">136
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">137
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">138
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">139
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">140
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">141
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">142
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">143
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">144
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">145
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">146
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">147
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">148
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">149
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">150
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">151
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">152
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">153
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">154
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">155
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">156
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">157
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">158
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">159
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">160
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">161
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">162
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">163
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">164
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">165
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">166
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">167
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">168
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">169
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">170
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">171
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">172
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">173
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">174
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">175
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">176
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">177
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">178
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">179
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">180
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">181
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">182
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">183
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">184
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">185
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">186
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">187
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">188
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">189
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">190
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">191
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">192
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">193
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">194
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">195
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">196
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">197
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">198
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">199
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">200
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">201
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">202
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">203
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">204
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">205
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">206
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">207
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">208
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">209
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">210
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">211
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">212
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">213
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">214
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">215
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">216
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">217
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">218
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">219
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">220
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">221
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">222
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">223
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">224
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">225
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">226
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">227
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">228
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">229
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">230
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">231
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">232
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">233
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">234
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">235
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">236
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">237
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">238
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">239
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">240
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">241
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">242
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">243
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">244
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">245
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">246
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">247
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">248
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">249
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">250
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">251
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">252
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">253
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">254
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">255
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">256
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">257
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">258
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">259
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">260
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">261
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">262
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">263
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">264
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">265
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">266
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">267
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">268
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">269
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">270
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">271
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">272
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">273
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">274
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">275
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">276
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">277
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">278
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">279
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">280
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">281
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">282
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">283
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">284
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">285
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">286
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">287
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">288
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">289
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">290
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">291
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">292
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">293
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">294
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">295
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">296
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">297
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">298
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">299
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">300
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">301
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">302
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">303
</span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">304
</span></code></pre></td>
<td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
<pre style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#998;font-style:italic">################最基础配置#####################</span>
vim /etc/my.cnf 

<span style="color:#998;font-style:italic">#服务器端配置</span>
<span style="color:#000;font-weight:bold">[</span>mysqld<span style="color:#000;font-weight:bold">]</span>
<span style="color:#998;font-style:italic">#用户</span>
<span style="color:#008080">user</span><span style="color:#000;font-weight:bold">=</span>mysql
<span style="color:#998;font-style:italic">#软件安装目录</span>
<span style="color:#008080">basedir</span><span style="color:#000;font-weight:bold">=</span>/application/mysql
<span style="color:#998;font-style:italic">#数据路径</span>
<span style="color:#008080">datadir</span><span style="color:#000;font-weight:bold">=</span>/data/mysql/data
<span style="color:#998;font-style:italic">#socket文件位置</span>
<span style="color:#008080">socket</span><span style="color:#000;font-weight:bold">=</span>/tmp/mysql.sock
<span style="color:#998;font-style:italic">#服务器id号</span>
<span style="color:#008080">server_id</span><span style="color:#000;font-weight:bold">=</span><span style="color:#099">6</span>
<span style="color:#998;font-style:italic">#监听端口号</span>
<span style="color:#008080">port</span><span style="color:#000;font-weight:bold">=</span><span style="color:#099">3306</span>
<span style="color:#998;font-style:italic">#客户端配置</span>
<span style="color:#000;font-weight:bold">[</span>mysql<span style="color:#000;font-weight:bold">]</span>
<span style="color:#998;font-style:italic">#socket文件位置</span>
<span style="color:#008080">socket</span><span style="color:#000;font-weight:bold">=</span>/tmp/mysql.sock


<span style="color:#998;font-style:italic">#####################################</span>
<span style="color:#000;font-weight:bold">[</span>client<span style="color:#000;font-weight:bold">]</span>
<span style="color:#008080">port</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">3306</span>
<span style="color:#008080">socket</span> <span style="color:#000;font-weight:bold">=</span> /tmp/mysql.sock
default-character-set<span style="color:#000;font-weight:bold">=</span>utf8

<span style="color:#000;font-weight:bold">[</span>mysqld<span style="color:#000;font-weight:bold">]</span> 
<span style="color:#998;font-style:italic">#可以免密码登录</span>
skip-grant-tables

<span style="color:#998;font-style:italic">###############################基础设置#####################################</span>

<span style="color:#998;font-style:italic">#Mysql服务的唯一编号 每个mysql服务Id需唯一</span>
server-id <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1</span>

<span style="color:#998;font-style:italic">#服务端口号 默认3306</span>
<span style="color:#008080">port</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">3306</span>

<span style="color:#008080">default_storage_engine</span><span style="color:#000;font-weight:bold">=</span>InnoDB

skip-name-resolve

<span style="color:#998;font-style:italic">#mysql安装根目录</span>
<span style="color:#008080">basedir</span> <span style="color:#000;font-weight:bold">=</span> /usr/local/mysql

<span style="color:#998;font-style:italic">#mysql数据文件所在位置,</span>
<span style="color:#008080">datadir</span> <span style="color:#000;font-weight:bold">=</span>/usr/local/mysql/data

<span style="color:#998;font-style:italic">#临时目录 比如load data infile会用到</span>
<span style="color:#008080">tmpdir</span>  <span style="color:#000;font-weight:bold">=</span> /tmp

<span style="color:#998;font-style:italic">#设置socke文件所在目录</span>
<span style="color:#008080">socket</span>  <span style="color:#000;font-weight:bold">=</span> /tmp/mysql.sock

<span style="color:#998;font-style:italic">#主要用于MyISAM存储引擎,如果多台服务器连接一个数据库则建议注释下面内容</span>
skip-external-locking

<span style="color:#998;font-style:italic">#只能用IP地址检查客户端的登录，不用主机名</span>
<span style="color:#008080">skip_name_resolve</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1</span>

<span style="color:#998;font-style:italic">#事务隔离级别，默认为可重复读，mysql默认可重复读级别（此级别下可能参数很多间隙锁，影响性能）</span>
<span style="color:#008080">transaction_isolation</span> <span style="color:#000;font-weight:bold">=</span> READ-COMMITTED

<span style="color:#998;font-style:italic">#数据库默认字符集,主流字符集支持一些特殊表情符号（特殊表情符占用4个字节）</span>
character-set-server <span style="color:#000;font-weight:bold">=</span> utf8mb4

<span style="color:#998;font-style:italic">#数据库字符集对应一些排序等规则，注意要和character-set-server对应</span>
collation-server <span style="color:#000;font-weight:bold">=</span> utf8mb4_general_ci

<span style="color:#998;font-style:italic">#设置client连接mysql时的字符集,防止乱码</span>
<span style="color:#998;font-style:italic">#init_connect=‘SET NAMES utf8mb4‘</span>

<span style="color:#998;font-style:italic">#是否对sql语句大小写敏感，1表示不敏感</span>
<span style="color:#008080">lower_case_table_names</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1</span>

<span style="color:#998;font-style:italic">#最大连接数</span>
<span style="color:#008080">max_connections</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">400</span>

<span style="color:#998;font-style:italic">#最大错误连接数</span>
<span style="color:#008080">max_connect_errors</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1000</span>

<span style="color:#998;font-style:italic">#TIMESTAMP如果没有显示声明NOT NULL，允许NULL值</span>
<span style="color:#008080">explicit_defaults_for_timestamp</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#0086b3">true</span>

<span style="color:#998;font-style:italic">#SQL数据包发送的大小，如果有BLOB对象建议修改成1G</span>
<span style="color:#008080">max_allowed_packet</span> <span style="color:#000;font-weight:bold">=</span> 128M

<span style="color:#998;font-style:italic">#MySQL连接闲置超过一定时间后(单位：秒)将会被强行关闭</span>
<span style="color:#998;font-style:italic">#MySQL默认的wait_timeout  值为8个小时, interactive_timeout参数需要同时配置才能生效</span>
<span style="color:#008080">interactive_timeout</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">2880000</span>
<span style="color:#008080">wait_timeout</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">2880000</span>

<span style="color:#998;font-style:italic">#内部内存临时表的最大值 ，设置成128M。</span>
<span style="color:#998;font-style:italic">#比如大数据量的group by ,order by时可能用到临时表，</span>
<span style="color:#998;font-style:italic">#超过了这个值将写入磁盘，系统IO压力增大</span>
<span style="color:#008080">tmp_table_size</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">134217728</span>
<span style="color:#008080">max_heap_table_size</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">134217728</span>

<span style="color:#998;font-style:italic">#禁用mysql的缓存查询结果集功能</span>
<span style="color:#998;font-style:italic">#后期根据业务情况测试决定是否开启</span>
<span style="color:#998;font-style:italic">#大部分情况下关闭下面两项</span>
<span style="color:#008080">query_cache_size</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">0</span>
<span style="color:#008080">query_cache_type</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">0</span>

<span style="color:#998;font-style:italic">#MySQL5.7 group by新特性，报错1055,具体需要根据本身情况进行设定,没有固定值</span>
<span style="color:#008080">sql_mode</span><span style="color:#000;font-weight:bold">=</span>STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

<span style="color:#998;font-style:italic">#####################用户进程分配到的内存设置BEGIN#############################</span>

<span style="color:#998;font-style:italic">##每个session将会分配参数设置的内存大小</span>
<span style="color:#998;font-style:italic">#用于表的顺序扫描，读出的数据暂存于read_buffer_size中，当buff满时或读完，将数据返回上层调用者</span>
<span style="color:#998;font-style:italic">#一般在128kb ~ 256kb,用于MyISAM</span>
<span style="color:#998;font-style:italic">#read_buffer_size = 131072</span>
<span style="color:#998;font-style:italic">#用于表的随机读取，当按照一个非索引字段排序读取时会用到，</span>
<span style="color:#998;font-style:italic">#一般在128kb ~ 256kb,用于MyISAM</span>
<span style="color:#998;font-style:italic">#read_rnd_buffer_size = 262144</span>
<span style="color:#998;font-style:italic">#order by或group by时用到</span>

<span style="color:#998;font-style:italic">#建议先调整为2M，后期观察调整</span>
<span style="color:#008080">sort_buffer_size</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">2097152</span>

<span style="color:#998;font-style:italic">#一般数据库中没什么大的事务，设成1~2M，默认32kb</span>
<span style="color:#008080">binlog_cache_size</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">524288</span>

<span style="color:#998;font-style:italic">########################用户进程分配到的内存设置END############################</span>

<span style="color:#998;font-style:italic">#在MySQL暂时停止响应新请求之前的短时间内多少个请求可以被存在堆栈中</span>
<span style="color:#998;font-style:italic">#官方建议back_log = 50 + (max_connections / 5),封顶数为900</span>
<span style="color:#008080">back_log</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">130</span>

<span style="color:#998;font-style:italic">############################日志设置##########################################</span>

<span style="color:#998;font-style:italic">#数据库错误日志文件</span>
<span style="color:#008080">log_error</span> <span style="color:#000;font-weight:bold">=</span> error.log

<span style="color:#998;font-style:italic">#慢查询sql日志设置</span>
<span style="color:#008080">slow_query_log</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1</span>
<span style="color:#008080">slow_query_log_file</span> <span style="color:#000;font-weight:bold">=</span> slow.log

<span style="color:#998;font-style:italic">#检查未使用到索引的sql</span>
<span style="color:#008080">log_queries_not_using_indexes</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1</span>

<span style="color:#998;font-style:italic">#针对log_queries_not_using_indexes开启后，记录慢sql的频次、每分钟记录的条数</span>
<span style="color:#008080">log_throttle_queries_not_using_indexes</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">5</span>

<span style="color:#998;font-style:italic">#作为从库时生效,从库复制中如何有慢sql也将被记录</span>
<span style="color:#008080">log_slow_slave_statements</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1</span>

<span style="color:#998;font-style:italic">#慢查询执行的秒数，必须达到此值可被记录</span>
<span style="color:#008080">long_query_time</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">8</span>

<span style="color:#998;font-style:italic">#检索的行数必须达到此值才可被记为慢查询</span>
<span style="color:#008080">min_examined_row_limit</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">100</span>

<span style="color:#998;font-style:italic">#mysql binlog日志文件保存的过期时间，过期后自动删除</span>
<span style="color:#008080">expire_logs_days</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">5</span>

<span style="color:#998;font-style:italic">############################主从复制设置#####################################</span>

<span style="color:#998;font-style:italic">#开启mysql binlog功能</span>
log-bin<span style="color:#000;font-weight:bold">=</span>mysql-bin

<span style="color:#998;font-style:italic">#binlog记录内容的方式，记录被操作的每一行</span>
<span style="color:#008080">binlog_format</span> <span style="color:#000;font-weight:bold">=</span> ROW

<span style="color:#998;font-style:italic">#对于binlog_format = ROW模式时，减少记录日志的内容，只记录受影响的列</span>
<span style="color:#008080">binlog_row_image</span> <span style="color:#000;font-weight:bold">=</span> minimal

<span style="color:#998;font-style:italic">#master status and connection information输出到表mysql.slave_master_info中</span>
<span style="color:#008080">master_info_repository</span> <span style="color:#000;font-weight:bold">=</span> TABLE

<span style="color:#998;font-style:italic">#the slave‘s position in the relay logs输出到表mysql.slave_relay_log_info中</span>
<span style="color:#008080">relay_log_info_repository</span> <span style="color:#000;font-weight:bold">=</span> TABLE

<span style="color:#998;font-style:italic">#作为从库时生效,想进行级联复制，则需要此参数</span>
log_slave_updates

<span style="color:#998;font-style:italic">#作为从库时生效,中继日志relay-log可以自我修复</span>
<span style="color:#008080">relay_log_recovery</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1</span>

<span style="color:#998;font-style:italic">#作为从库时生效,主从复制时忽略的错误</span>
<span style="color:#008080">slave_skip_errors</span> <span style="color:#000;font-weight:bold">=</span> ddl_exist_errors

<span style="color:#998;font-style:italic">#####################redo log和binlog的关系设置BEGIN#########################</span>

<span style="color:#998;font-style:italic">#(步骤1) prepare dml相关的SQL操作，然后将redo log buff中的缓存持久化到磁盘</span>
<span style="color:#998;font-style:italic">#(步骤2)如果前面prepare成功，那么再继续将事务日志持久化到binlog</span>
<span style="color:#998;font-style:italic">#(步骤3)如果前面成功，那么在redo log里面写上一个commit记录</span>
<span style="color:#998;font-style:italic">#当innodb_flush_log_at_trx_commit和sync_binlog都为1时是最安全的，</span>
<span style="color:#998;font-style:italic">#在mysqld服务崩溃或者服务器主机crash的情况下，binary log只有可能丢失最多一个语句或者一个事务。</span>
<span style="color:#998;font-style:italic">#但是都设置为1时会导致频繁的io操作，因此该模式也是最慢的一种方式。</span>
<span style="color:#998;font-style:italic">#当innodb_flush_log_at_trx_commit设置为0，mysqld进程的崩溃会导致上一秒钟所有事务数据的丢失。</span>
<span style="color:#998;font-style:italic">#当innodb_flush_log_at_trx_commit设置为2，只有在操作系统崩溃或者系统掉电的情况下，上一秒钟所有事务数据才可能丢失。</span>

<span style="color:#998;font-style:italic">#commit事务时,控制redo log buff持久化磁盘的模式 默认为1</span>
<span style="color:#008080">innodb_flush_log_at_trx_commit</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">2</span>

<span style="color:#998;font-style:italic">#commit事务时,控制写入mysql binlog日志的模式 默认为0</span>
<span style="color:#998;font-style:italic">#innodb_flush_log_at_trx_commit和sync_binlog都为1时，mysql最为安全但性能上压力也是最大</span>
<span style="color:#008080">sync_binlog</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1</span>

<span style="color:#998;font-style:italic">####################redo log和binlog的关系设置END############################</span>

<span style="color:#998;font-style:italic">############################Innodb设置#####################################</span>

<span style="color:#998;font-style:italic">#数据块的单位8k，默认是16k，16kCPU压力稍小，8k对select的吞吐量大</span>
<span style="color:#998;font-style:italic">#innodb_page_size的参数值也影响最大索引长度，8k比16k的最大索引长度小</span>
<span style="color:#998;font-style:italic">#innodb_page_size = 8192</span>

<span style="color:#998;font-style:italic">#一般设置物理存储的60% ~ 70%</span>
<span style="color:#008080">innodb_buffer_pool_size</span> <span style="color:#000;font-weight:bold">=</span> 1G

<span style="color:#998;font-style:italic">#5.7.6之后默认16M</span>
<span style="color:#998;font-style:italic">#innodb_log_buffer_size = 16777216</span>

<span style="color:#998;font-style:italic">#该参数针对unix、linux，window上直接注释该参数.默认值为NULL</span>
<span style="color:#998;font-style:italic">#O_DIRECT减少操作系统级别VFS的缓存和Innodb本身的buffer缓存之间的冲突</span>
<span style="color:#008080">innodb_flush_method</span> <span style="color:#000;font-weight:bold">=</span> O_DIRECT

<span style="color:#998;font-style:italic">#此格式支持压缩, 5.7.7之后为默认值</span>
<span style="color:#008080">innodb_file_format</span> <span style="color:#000;font-weight:bold">=</span> Barracuda

<span style="color:#998;font-style:italic">#CPU多核处理能力设置，假设CPU是2颗4核的，设置如下</span>
<span style="color:#998;font-style:italic">#读多，写少可以设成2:6的比例</span>
<span style="color:#008080">innodb_write_io_threads</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">4</span>
<span style="color:#008080">innodb_read_io_threads</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">4</span>

<span style="color:#998;font-style:italic">#提高刷新脏页数量和合并插入数量，改善磁盘I/O处理能力</span>
<span style="color:#998;font-style:italic">#默认值200（单位：页）</span>
<span style="color:#998;font-style:italic">#可根据磁盘近期的IOPS确定该值</span>
<span style="color:#008080">innodb_io_capacity</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">500</span>

<span style="color:#998;font-style:italic">#为了获取被锁定的资源最大等待时间，默认50秒，超过该时间会报如下错误:</span>
<span style="color:#998;font-style:italic"># ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction</span>
<span style="color:#008080">innodb_lock_wait_timeout</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">30</span>

<span style="color:#998;font-style:italic">#调整buffer pool中最近使用的页读取并dump的百分比,通过设置该参数可以减少转储的page数</span>
<span style="color:#008080">innodb_buffer_pool_dump_pct</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">40</span>

<span style="color:#998;font-style:italic">#设置redoLog文件所在目录, redoLog记录事务具体操作内容</span>
<span style="color:#008080">innodb_log_group_home_dir</span> <span style="color:#000;font-weight:bold">=</span> /data/mysql/data/

<span style="color:#998;font-style:italic">#设置undoLog文件所在目录, undoLog用于事务回滚操作</span>
<span style="color:#008080">innodb_undo_directory</span> <span style="color:#000;font-weight:bold">=</span> /data/mysql/undo/

<span style="color:#998;font-style:italic">#在innodb_log_group_home_dir中的redoLog文件数, redoLog文件内容是循环覆盖写入。</span>
<span style="color:#008080">innodb_log_files_in_group</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">3</span>

<span style="color:#998;font-style:italic">#MySql5.7官方建议尽量设置的大些，可以接近innodb_buffer_pool_size的大小</span>
<span style="color:#998;font-style:italic">#之前设置该值较大时可能导致mysql宕机恢复时间过长，现在恢复已经加快很多了</span>
<span style="color:#998;font-style:italic">#该值减少脏数据刷新到磁盘的频次</span>
<span style="color:#998;font-style:italic">#最大值innodb_log_file_size * innodb_log_files_in_group &lt;= 512GB,单文件&lt;=256GB</span>
<span style="color:#008080">innodb_log_file_size</span> <span style="color:#000;font-weight:bold">=</span> 1024M

<span style="color:#998;font-style:italic">#设置undoLog文件所占空间可以回收</span>
<span style="color:#998;font-style:italic">#5.7之前的MySql的undoLog文件一直增大无法回收</span>
<span style="color:#008080">innodb_undo_log_truncate</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1</span>
<span style="color:#998;font-style:italic">#innodb_undo_tablespaces = 3</span>
<span style="color:#008080">innodb_undo_logs</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">128</span>

<span style="color:#998;font-style:italic">#5.7.7默认开启该参数 控制单列索引长度最大达到3072</span>
<span style="color:#998;font-style:italic">#innodb_large_prefix = 1</span>

<span style="color:#998;font-style:italic">#5.7.8默认为4个, Inodb后台清理工作的线程数</span>
<span style="color:#998;font-style:italic">#innodb_purge_threads = 4</span>

<span style="color:#998;font-style:italic">#通过设置配置参数innodb_thread_concurrency来限制并发线程的数量，</span>
<span style="color:#998;font-style:italic">#一旦执行线程的数量达到这个限制，额外的线程在被放置到对队列中之前，会睡眠数微秒，</span>
<span style="color:#998;font-style:italic">#可以通过设定参数innodb_thread_sleep_delay来配置睡眠时间</span>
<span style="color:#998;font-style:italic">#该值默认为0,在官方doc上，对于innodb_thread_concurrency的使用，也给出了一些建议:</span>
<span style="color:#998;font-style:italic">#(1)如果一个工作负载中，并发用户线程的数量小于64，建议设置innodb_thread_concurrency=0；</span>
<span style="color:#998;font-style:italic">#(2)如果工作负载一直较为严重甚至偶尔达到顶峰，建议先设置innodb_thread_concurrency=128,</span>
<span style="color:#998;font-style:italic">###并通过不断的降低这个参数，96, 80, 64等等，直到发现能够提供最佳性能的线程数</span>
<span style="color:#998;font-style:italic">#innodb_thread_concurrency = 0</span>

<span style="color:#998;font-style:italic">#强所有发生的死锁错误信息记录到error.log中，之前通过命令行只能查看最近一次死锁信息</span>
<span style="color:#008080">innodb_print_all_deadlocks</span> <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">1</span>

<span style="color:#998;font-style:italic">############################其他设置########################################</span>

<span style="color:#000;font-weight:bold">[</span>mysqldump<span style="color:#000;font-weight:bold">]</span>
quick
<span style="color:#008080">max_allowed_packet</span> <span style="color:#000;font-weight:bold">=</span> 128M

<span style="color:#000;font-weight:bold">[</span>mysql<span style="color:#000;font-weight:bold">]</span>
no-auto-rehash

<span style="color:#000;font-weight:bold">[</span>myisamchk<span style="color:#000;font-weight:bold">]</span>
<span style="color:#008080">key_buffer_size</span> <span style="color:#000;font-weight:bold">=</span> 20M
<span style="color:#008080">sort_buffer_size</span> <span style="color:#000;font-weight:bold">=</span> 256k
<span style="color:#008080">read_buffer</span> <span style="color:#000;font-weight:bold">=</span> 2M
<span style="color:#008080">write_buffer</span> <span style="color:#000;font-weight:bold">=</span> 2M

<span style="color:#000;font-weight:bold">[</span>mysqlhotcopy<span style="color:#000;font-weight:bold">]</span>
interactive-timeout

<span style="color:#000;font-weight:bold">[</span>mysqld_safe<span style="color:#000;font-weight:bold">]</span>
<span style="color:#998;font-style:italic">#增加每个进程的可打开文件数量</span>
open-files-limit <span style="color:#000;font-weight:bold">=</span> <span style="color:#099">28192</span>


</code></pre></td></tr></table>
</div>
</div>
        </div>

        


        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/post/Mysql-%E6%95%B0%E6%8D%AE%E5%BA%93/Mysql-%E6%93%8D%E4%BD%9C/">Mysql 基本操作</a></li>
        
        <li><a href="/post/Mysql-%E6%95%B0%E6%8D%AE%E5%BA%93/Mysql%E4%BD%93%E7%B3%BB%E7%BB%93%E6%9E%84%E7%AE%A1%E7%90%86/">Mysql体系结构管理</a></li>
        
        <li><a href="/post/Linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/">Linux 基础配置 </a></li>
        
        <li><a href="/post/Linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/linux-%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4-/">Linux 常用命令 </a></li>
        
        <li><a href="/post/Linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/Linux%E6%96%87%E4%BB%B6%E7%89%B9%E6%AE%8A%E6%9D%83%E9%99%90SUIDSGID%E4%B8%8ESBIT/">Linux文件特殊权限 </a></li>
        
    </ul>
</div>


        <div class="post-meta meta-tags">
            
            <ul class="clearfix">
                
                <li><a href='/tags/Mysql'>Mysql</a></li>
                
            </ul>
            
        </div>
    </article>
    
    

    
    
</div>

                    <footer id="footer">
    <div>
        &copy; 2021 <a href="https://gitmatrix.gitee.io/">matrix By matrix</a>
        
    </div>
    <br />
    
    <div>
        <div class="github-badge">
            <a href="https://gohugo.io/" target="_black" rel="nofollow"><span class="badge-subject">Powered by</span><span class="badge-value bg-blue">Hugo</span></a>
        </div>
        
        <div class="github-badge">
            <a href="https://github.com/flysnow-org/maupassant-hugo" target="_black"><span class="badge-subject">Theme</span><span class="badge-value bg-yellowgreen">Maupassant</span></a>
        </div>
    </div>
</footer>


    
    <script type="text/javascript">
        window.MathJax = {
            tex2jax: {
                inlineMath: [['$', '$']],
                processEscapes: true
                }
            };
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script><script src="https://cdn.bootcdn.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src='/js/totop.js?v=0.0.0' async=""></script>



    <script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




    <script src='/js/douban.js'></script>

                </div>

                <div id="secondary">
    <section class="widget">
        <form id="search" action='https://gitmatrix.gitee.io/search/' method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="https://gitmatrix.gitee.io/">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="https://gitmatrix.gitee.io/post/Linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/" title="Linux 基础配置 ">Linux 基础配置 </a>
    </li>
    
    <li>
        <a href="https://gitmatrix.gitee.io/post/Linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/linux-%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4-/" title="Linux 常用命令 ">Linux 常用命令 </a>
    </li>
    
    <li>
        <a href="https://gitmatrix.gitee.io/post/Linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/Linux%E6%96%87%E4%BB%B6%E7%89%B9%E6%AE%8A%E6%9D%83%E9%99%90SUIDSGID%E4%B8%8ESBIT/" title="Linux文件特殊权限 ">Linux文件特殊权限 </a>
    </li>
    
    <li>
        <a href="https://gitmatrix.gitee.io/post/Linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/Linux-%E7%A3%81%E7%9B%98%E6%8C%82%E8%BD%BD/" title="Liunx 磁盘分区与文件挂载 ">Liunx 磁盘分区与文件挂载 </a>
    </li>
    
    <li>
        <a href="https://gitmatrix.gitee.io/post/Mysql-%E6%95%B0%E6%8D%AE%E5%BA%93/my.cnf-%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E8%AF%A6%E8%A7%A3/" title="my.cnf 配置文件详解">my.cnf 配置文件详解</a>
    </li>
    
    <li>
        <a href="https://gitmatrix.gitee.io/post/Mysql-%E6%95%B0%E6%8D%AE%E5%BA%93/Mysql-%E6%93%8D%E4%BD%9C/" title="Mysql 基本操作">Mysql 基本操作</a>
    </li>
    
    <li>
        <a href="https://gitmatrix.gitee.io/post/Mysql-%E6%95%B0%E6%8D%AE%E5%BA%93/Mysql%E4%BD%93%E7%B3%BB%E7%BB%93%E6%9E%84%E7%AE%A1%E7%90%86/" title="Mysql体系结构管理">Mysql体系结构管理</a>
    </li>
    
    <li>
        <a href="https://gitmatrix.gitee.io/post/Linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/RAID-%E7%A3%81%E7%9B%98%E9%98%B5%E5%88%97/" title="RAID 磁盘阵列配置 ">RAID 磁盘阵列配置 </a>
    </li>
    
    <li>
        <a href="https://gitmatrix.gitee.io/post/Linux-%E5%9F%BA%E7%A1%80%E9%85%8D%E7%BD%AE/rpm-%E4%B8%8E-yum-/" title="RPM 与 Yum ">RPM 与 Yum </a>
    </li>
    
    <li>
        <a href="https://gitmatrix.gitee.io/post/SSH/SSH-%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9C/" title="SSH 基本操作">SSH 基本操作</a>
    </li>
    
</ul>
    </section>

    
<section class="widget">
    <h3 class="widget-title" style="color:#6E718A">课程直达</h3>
    <ul class="widget-list">
        
        <li>
            <a href="https://www.bilibili.com/video/BV1nA411h7C9" title="Burpsuite使用教程" target="_blank" style="color:#6E718A">
                
                    <img src="https://gitee.com/gitmatrix/images/raw/master/img/20210116152721.png">
                
            </a>
        </li>
        
        <li>
            <a href="https://www.bilibili.com/video/BV1yf4y1i7Pb?p=1" title="网络安全提升技术与渗透测试原理深度解析" target="_blank" style="color:#6E718A">
                
                    <img src="https://gitee.com/gitmatrix/images/raw/master/img/6f19fe2958f4d3c5edaee825cda334bac074abc8.jpg">
                
            </a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title"><a href='/categories/'>分类</a></h3>
<ul class="widget-list">
    
    <li><a href="https://gitmatrix.gitee.io/categories/Liunx/">Liunx (6)</a></li>
    
    <li><a href="https://gitmatrix.gitee.io/categories/Mysql/">Mysql (3)</a></li>
    
    <li><a href="https://gitmatrix.gitee.io/categories/SSH/">SSH (4)</a></li>
    
    <li><a href="https://gitmatrix.gitee.io/categories/Test/">Test (1)</a></li>
    
    <li><a href="https://gitmatrix.gitee.io/categories/Web-%E5%AE%89%E5%85%A8/">Web 安全 (9)</a></li>
    
    <li><a href="https://gitmatrix.gitee.io/categories/web%E5%9F%BA%E7%A1%80/">web基础 (1)</a></li>
    
    <li><a href="https://gitmatrix.gitee.io/categories/%E4%BF%A1%E6%81%AF%E6%94%B6%E9%9B%86/">信息收集 (10)</a></li>
    
    <li><a href="https://gitmatrix.gitee.io/categories/%E5%8D%81%E5%A4%A7%E6%BC%8F%E6%B4%9E/">十大漏洞 (8)</a></li>
    
    <li><a href="https://gitmatrix.gitee.io/categories/%E6%95%99%E7%A8%8B/">教程 (1)</a></li>
    
    <li><a href="https://gitmatrix.gitee.io/categories/%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8%E6%B3%95/">网络安全法 (1)</a></li>
    
    <li><a href="https://gitmatrix.gitee.io/categories/%E8%BF%90%E7%BB%B4/">运维 (2)</a></li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title"><a href='/tags/'>标签</a></h3>
<div class="tagcloud">
    
    <a href="https://gitmatrix.gitee.io/tags/CSRF/">CSRF</a>
    
    <a href="https://gitmatrix.gitee.io/tags/Chrome-Extension/">Chrome Extension</a>
    
    <a href="https://gitmatrix.gitee.io/tags/Chrome%E6%8F%92%E4%BB%B6/">Chrome插件</a>
    
    <a href="https://gitmatrix.gitee.io/tags/Google-hacking/">Google hacking</a>
    
    <a href="https://gitmatrix.gitee.io/tags/JavaScript/">JavaScript</a>
    
    <a href="https://gitmatrix.gitee.io/tags/Linux/">Linux</a>
    
    <a href="https://gitmatrix.gitee.io/tags/Mysql/">Mysql</a>
    
    <a href="https://gitmatrix.gitee.io/tags/Payload/">Payload</a>
    
    <a href="https://gitmatrix.gitee.io/tags/XSS/">XSS</a>
    
    <a href="https://gitmatrix.gitee.io/tags/Zabbix/">Zabbix</a>
    
    <a href="https://gitmatrix.gitee.io/tags/js/">js</a>
    
    <a href="https://gitmatrix.gitee.io/tags/Mysql/">Mysql</a>
    
    <a href="https://gitmatrix.gitee.io/tags/sql/">sql</a>
    
    <a href="https://gitmatrix.gitee.io/tags/ssh/">ssh</a>
    
    <a href="https://gitmatrix.gitee.io/tags/test/">test</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E4%B8%AD%E5%8D%8E%E4%BA%BA%E6%B0%91%E5%85%B1%E5%92%8C%E5%9B%BD%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8%E6%B3%95/">中华人民共和国网络安全法</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF%E6%94%B6%E9%9B%86/">基本信息收集</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E6%8C%87%E7%BA%B9%E8%AF%86%E5%88%AB/">指纹识别</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E6%94%B6%E9%9B%86%E5%AD%90%E5%9F%9F%E4%BF%A1%E6%81%AF/">收集子域信息</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E6%94%B6%E9%9B%86%E6%95%8F%E6%84%9F%E7%9B%AE%E5%BD%95%E6%96%87%E4%BB%B6/">收集敏感目录文件</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E6%94%BB%E5%87%BB/">攻击</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E6%95%99%E7%A8%8B/">教程</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E6%95%B4%E7%AB%99%E5%88%86%E6%9E%90/">整站分析</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E6%96%87%E4%BB%B6/">文件</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E6%B8%97%E9%80%8F%E6%B5%8B%E8%AF%95%E4%BB%8B%E7%BB%8D/">渗透测试介绍</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E6%B8%97%E9%80%8F%E6%B5%8B%E8%AF%95%E6%B5%81%E7%A8%8B/">渗透测试流程</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E6%BC%8F%E6%B4%9E/">漏洞</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E7%9C%9F%E5%AE%9EIP%E5%9C%B0%E5%9D%80%E6%9F%A5%E8%AF%A2/">真实IP地址查询</a>
    
    <a href="https://gitmatrix.gitee.io/tags/%E9%9D%B6%E5%9C%BA/">靶场</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="https://www.bugbank.cn/" title="漏洞银行">漏洞银行</a>
        </li>
        
        <li>
            <a target="_blank" href="https://www.xf1433.com/59.html" title="电脑黑客书籍在线阅读">电脑黑客书籍在线阅读</a>
        </li>
        
        <li>
            <a target="_blank" href="http://yuedu.baidu.com/ebook/14a722970740be1e640e9a3e" title="Android Gradle权威指南">Android Gradle权威指南</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="https://gitmatrix.gitee.io/index.xml"></a></li>
        </ul>
    </section>
</div>
            </div>
        </div>
    </div>
</body>

</html>